﻿using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace Xioa_UI.Convert;

public class RoundedCornerHeightConverter : IValueConverter
{
    public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
    {
        return new CornerRadius(Math.Round(((double?)value / 2) ?? 0, 1));
    }

    public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
    {
        throw new NotImplementedException();
    }
}